<?php

if (!isset($_GET['education']))
	$tabEducation = getEducation();

echo '<section id="education" class="content">';

if (isset($tabEducation) && count($tabEducation) > 0)
	foreach ($tabEducation as $education) {
		echo <<< EOTASKS
<div class="educationCell" itemscope itemtype="http://data-vocabulary.org/Organization">
EOTASKS;
        if($education->image() != null)
            echo '<img src="'.$siteAction->staticPath.'img/'.$education->image().'" alt="'.$education->name().'"/>';
echo <<< EOTASKS
	<h1 itemprop="name">{$education->name()}</h1>
EOTASKS;
        if($education->description() != null && $education->description() != ''){
            echo <<< EOTASKS
    <span class="description">{$education->description()}</span>
    <br/>
EOTASKS;
        }
        echo <<< EOTASKS
	<span class="year">{$education->yearIn()}-{$education->yearOut()}</span> - <span class="place" itemprop="locality">{$education->place()}</span>
	<br/>
EOTASKS;
        if($education->diploma() != null && $education->diploma() != ''){
            echo <<< EOTASKS
	<span>{$education->diploma()}</span>
	<br/>
EOTASKS;
        }
        echo <<< EOTASKS
	<a href="http://{$education->website()}/" onclick="window.open('http://{$education->website()}/');return false;" class="website" itemprop="url">{$education->website()}</a>
EOTASKS;

		if ($education->longDescription() != null) {
			echo <<< EOTASKS
	<div class="clear">
        <span class="bold">Description: </span>
        <span>{$education->longDescription()}</span>
    </div>
EOTASKS;
        }
		if ($education->extra() != null) {
			echo <<< EOTASKS
	<div class="clear">
        <span class="bold">extra-curiculars: </span>
        <span>{$education->extra()}</span>
    </div>
EOTASKS;
		}
		echo '</div>';
	}
else
	echo 'no education';

echo '</section>';
?>